130741
@@ -136,6 +136,7 @@
public class XMLPropertyListConfiguration extends AbstractHierarchicalFileConfig
      */
     public XMLPropertyListConfiguration()
     {
+        initRoot();
     }
 
     /**
@@ -224,6 +225,14 @@
public class XMLPropertyListConfiguration extends AbstractHierarchicalFileConfig
 
     public void load(Reader in) throws ConfigurationException
     {
+        // We have to make sure that the root node is actually a PListNode.
+        // If this object was not created using the standard constructor, the
+        // root node is a plain Node.
+        if (!(getRootNode() instanceof PListNode))
+        {
+            initRoot();
+        }
+
         // set up the DTD validation
         EntityResolver resolver = new EntityResolver()
         {
@@ -414,6 +423,14 @@
public class XMLPropertyListConfiguration extends AbstractHierarchicalFileConfig
         }
     }
 
+    /**
+     * Helper method for initializing the configuration's root node.
+     */
+    private void initRoot()
+    {
+        setRootNode(new PListNode());
+    }
+
     /**
      * SAX Handler to build the configuration nodes while the document is being parsed.
      */
